﻿<UserControl x:Class="SL_Drag_Drop.sucDragDrop2"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
>
    <Grid x:Name="LayoutRoot">
        <Grid.ColumnDefinitions>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="10">
            <TextBlock Text="Custom behaviour: RemoveElementDropBehaviour = Replace" 
                       FontSize="14" 
                       HorizontalAlignment="Left" VerticalAlignment="Top"
                       ></TextBlock>
            <TextBlock TextWrapping="Wrap" Margin="0,10,0,0">
            Same as the previous custom behaviour, but RemoveElementDropBehaviour is now equal to "Replace"
            </TextBlock>
            
            <TextBlock TextWrapping="Wrap" Margin="0,10,0,0">
            (meaning: if you
            drop a dragsource onto a droptarget which already has a child, and the child cannot be moved to the position
            of your dragsource, the drop will REPLACE the original child.  This means the original child will be lost.  
            Not begin able to move the child can be due to the dragsource
            not residing on a droptarget (ie: child cannot be moved because there's nothing to move it to), or because
            the droptarget where the dragsource was residing isn't a valid droptarget for the child (every dragsource
            has a customizable list of targets you can drop it on.)</TextBlock>
            
            <TextBlock TextWrapping="Wrap" Margin="0,10,0,0">
            To try this, drop dragsource 1 on droptarget 1, then drop dragsource 2 on droptarget 1.  When doing this,
            the drop will replace dragsource 1 with dragsource 2, resulting in the removal of dragsource 1.
            </TextBlock>
        </StackPanel>
       

        <StackPanel x:Name="PanelDropTargets" Orientation="Vertical" HorizontalAlignment="Center"
                           Grid.Row="1" Grid.Column="0">
        </StackPanel>


        <StackPanel x:Name="PanelDragSources" Orientation="Vertical" HorizontalAlignment="Center"
                           Grid.Row="1" Grid.Column="1">
        </StackPanel>

    </Grid>
</UserControl>
